package org.jgs1904.quickstart.controller;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.net.http.HttpRequest;

/**
 * @author: 默苍璃
 * @date: 2025-06-0609:13
 */
@RestController
@RequestMapping("/ip")
public class IPConfig {

    @RequestMapping("/get")
    public String getIP(HttpServletRequest request) {
        String remoteAddr = request.getRemoteAddr();
        System.out.println(remoteAddr);
        return remoteAddr;
    }

}
